package common

// metric types
const (
	MetricCPURate = "cpu_rate"
	MetricMemRate = "mem_rate"

	MetricNetSent = "net_sent" // 网络发送 单位：兆字节数
	MetricNetRecv = "net_recv" // 网络接收 单位：兆字节数

	MetricDiskUsedRate = "disk_used_rate" // 磁盘已使用空间百分比
	MetricDiskFreeRate = "disk_free_rate" // 磁盘未使用空间百分比

	MetricDiskWrite = "disk_write" // 磁盘写 单位：兆字节数
	MetricDiskRead  = "disk_read"  // 磁盘读 单位：兆字节数

	DataUnit = 1024 * 1024 // the size of data unit, MB
)

const (
	KeyPubAddress = "pub_ip" // the key of external ip address value
	KeyLocAddress = "loc_ip" // the key of internal ip address value

	KeySys      = "os"
	KeyCountry  = "country" //nation of service provider
	KeyTimezone = "timezone"
	KeyRegion   = "region" //region of service provider
	KeyCity     = "city"   //city of service provider
	KeyISP      = "isp"    //name of service provider
)

// response code definition
const (
	CodeSuccess          = 0     // success
	CodeTransmitDenied   = 10000 // error
	CodeFailedToHandle   = 10001
	CodeFailedToTransmit = 10002
	CodeFailedToStored   = 10003
)

const (
	HandleTimeout = 500 // 发送报文的超时时间, 单位: 毫秒
)
